<template>
  <div class="artical-item">
    <van-cell :to="'/article/'+artical.art_id" :title="artical.title" size="large">
      <div slot="label" class="cellLabel">
        <div v-if="artical.cover.type===3" class="cover-image">
          <van-image v-for="(item,index) in artical.cover.images" :key="index" fit="cover" :src="item" />
        </div>
        <span>{{ artical.aut_name }}</span>
        <span class="common">{{ artical.comm_count }}评论</span>
        <span>{{ artical.pubdate | formatDate}}</span>
      </div>

      <!-- 自定义右侧内容 -->
      <div>
        <van-image v-if="artical.cover.type===1" class="right-img" fit="contain" :src="artical.cover.images[0]" />
      </div>
    </van-cell>

  </div>
</template>

<script>
export default {
  data () {
    return {}
  },
  props: {
    artical: {
      type: Object,
      require: true
    }
  },
  methods: {},
  computed: {},
  watch: {},
  filters: {},
  components: {},
  created () { },
  mounted () { }
}
</script>

<style scoped lang='less'>
.artical-item {
  .van-cell__title {
    flex: unset;
  }
  .cellLabel {
    font-size: 23px;
    color: #999;
    .common {
      margin: 24px 10px;
    }
    .cover-image {
      display: flex;
      margin: 30px 0;
      .van-image {
        width: 232px;
        height: 146px;
      }
      .van-image:nth-child(2) {
        margin: 0 3px;
      }
    }
  }
  .right-img {
    width: 232px;
    height: 146px;
  }
}
</style>
